package com.example.taximeter.bean;


import com.alibaba.fastjson.annotation.JSONField;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * 物价文件日志
 */
public class ParamFileLog {

    @Valid
    @NotNull(message = "参数文件日志id格式错误", groups =  GroupUpdate.class)
    private Integer id;//参数文件日志id--主键

    @Valid
    @NotNull(message = "物价文件id格式错误", groups = GroupCreate.class)
    @Length(min = 32, max = 32, message = "用户名称格式错误", groups = GroupCreate.class)
    private String paramid;//物价文件id--外键


    @Length(min = 1, max = 20, message = "用户名称格式错误", groups = GroupCreate.class)
    private String username;//用户名称

    @NotNull(message = "操作方式格式错误", groups = GroupCreate.class)
    private Integer opertype;//操作方式

    @Length(min = 1, max = 200, message = "操作内容格式错误", groups = GroupCreate.class)
    private String opercontent;//操作内容

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date opertime;//操作时间

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getParamid() {
        return paramid;
    }

    public void setParamid(String paramid) {
        this.paramid = paramid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getOpertype() {
        return opertype;
    }

    public void setOpertype(Integer opertype) {
        this.opertype = opertype;
    }

    public String getOpercontent() {
        return opercontent;
    }

    public void setOpercontent(String opercontent) {
        this.opercontent = opercontent;
    }

    public Date getOpertime() {
        return opertime;
    }

    public void setOpertime(Date opertime) {
        this.opertime = opertime;
    }
}
